lib/repo: Ensure min-free-space* config value doesn't overflow
authorUmang Jain <umang@endlessm.com>
Fri, 31 Aug 2018 14:14:22 +0000 (19:44 +0530)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 4 Sep 2018 21:31:33 +0000 (21:31 +0000)
commit3814d075cb7306f111bfa41f10b7d719d08b2679
tree8c2161eb84bd5e29f800d0bb31f9aa644e351bc6
parent74bdf7e173f2849dd19e8f74ee8596d30b51a320
lib/repo: Ensure min-free-space* config value doesn't overflow
when converted to bytes

In a subsequent commit, we add a public API to read the value of
min-free-space-* value in bytes. The value for free space check
is enforced in terms of block size instead of bytes. Therefore,
for consistency we check while preparing the transaction that the
value doesn't overflow when converted to bytes.

https://phabricator.endlessm.com/T23694

Closes: #1715
Approved by: cgwalters
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-private.h